//
//  YearListView.swift
//  MakeMoney
//
//  Created by fan zhiqiang on 2024/12/18.
//

import SwiftUI

struct YearListView: View {
    @Bindable var pathStore: PathStore
    var body: some View {
        List(lotteryYears, id: \.self) { year in
            Button(String(year)) {
                pathStore.path.append(YearDetailPath(param: year))
            }
            //.buttonStyle(.plain)
        }
        .toolbar(.hidden, for: .tabBar)
        .navigationTitle("年份")
        .navigationDestination(for: YearDetailPath.self) { path in
            YearDetailView(pathStore: pathStore, year: path.param)
        }
    }
}

#Preview {
    YearListView(pathStore: .init())
}


class YearListPath: PathName { }
